package com.zhong.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
public class TestController {

//    @Value("${server.port}")
    private String port;

//    @Value("${emp.name}lisi")  //设置默认值
    private String abc;

//    @RequestMapping("/test")
    public String test(){
        return port;
    }

    @RequestMapping("/test2")
    public String test2(){
        return abc;
    }
}
